#ifndef _XMLSOCK_H
#define _XMLSOCK_H

#define   CONF_NETWORKSET          "/tmp/networksettings.xml"
#define   CONF_SIPSETTING          "/tmp/sipsettings.xml"
#define   CONF_PHONESETTING        "/tmp/phonesettings.xml"
#define   CONF_RECORD              "/tmp/record.xml"
#define   CONF_CONTACT              "/tmp/contact.xml"

#define sizearray(a)  (sizeof(a) / sizeof((a)[0]))
enum {
    XML_SAVE_NOW = 0,
    XML_SAVE_DELAY = 1,
};

int xml_init(int nDevType);
int xml_gets(const char *xmlfile, const char *nodepath, char *szValue, int nLen, const char* szDefaultValue);
int xml_sets(const char *xmlfile, const char *nodepath, char *szValue, int nSaveDelay);

int xml_getn(const char *xmlfile, const char *nodepath, int *pValue, int *pDefaultValue);
int xml_setn(const char *xmlfile, const char *nodepath, int nValue, int nSaveDelay);

int xml_getattr(const char *xmlfile, const char *nodepath, const char *szAttrName, char *szAttrValue, int nLen);
int xml_setattr(const char *xmlfile, const char *nodepath, const char *szAttrName, char *szAttrValue, int nSaveDelay);

int xml_replace(const char *szXmlfile_Old, const char *xmlfile_tmp, const char *xmlfile_config);

int xml_reload();


#endif
